var stageTemplate = `
<header>
    <span class="bill_text" id="billText">{{ titleText }}</span>
    <span v-on:click="goBack" id="fanhui"  v-bind:style="{display: fhDisplay}" class="icons-fanhui"></span>
</header>
`

function getMPheader (headerOption,goBack) {

    return {
        template: stageTemplate,
        data: function() {
            return {
                "titleText": headerOption.titleText
            };
        },
        computed: {
            fhDisplay:function  () {
                var fhstyle = 'inline-block';
                if(headerOption.fhstyle){
                    fhstyle = headerOption.fhstyle;
                }

                return fhstyle;
            }
        },
        methods: {
            "goBack":goBack
        }
    };
}

module.exports = {
    getMPheader: getMPheader
}